package org.chen.newsapi.service.impl;

import org.chen.newsapi.dto.CategoryVO;
import org.chen.newsapi.mapper.CategoryMapper;
import org.chen.newsapi.service.CategoryService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

@Service
public class CategoryServiceImpl implements CategoryService {
    
    @Autowired
    private CategoryMapper categoryMapper;
    
    @Override
    public List<CategoryVO> getAllCategories() {
        return categoryMapper.selectCategoriesWithCount();
    }
}